home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
program
/
gemxx19.zoo
/
gem++19
/
man
/
gemw.man
< prev
next >
Wrap
Text File
|
1993-11-19
|
8KB
|
217 lines
GEM++ - C++ LIBRARIES FOR GEM/AES/VDI
NAME
GEMwindow - Standard GEM windows.
DESCRIPTION
A GEMwindow is a standard GEM window. Its contents is undefined,
and redraw requests have no effect - derived classes should
implement this. It does however handle the requirement of clipping
the redraw area, as well as resizing and scrollbars if those
controls are included in the window parts.
CONSTRUCTORS
GEMwindow(GEMactivity& act, int Parts)
Create a window with the given parts (see gemfast.h).
GEMwindow(GEMactivity& act, int Parts, const GRect&)
Create a window with the given parts and the given size.
GEMwindow(GEMactivity& act, int Parts, const GRect& actWorkArea, const GRect& maxWorkArea)
Create a window with the given parts and the given size for work
and maximum size.
GEMwindow(const GEMwindow&)
Create a window which is a copy of the given window in every
way, except positioned slightly to the right of and below the
original, and not open.
METHODS
virtual void Open()
Open the window. If the window is already open, it is
raised to the top. This call may fail if no windows are
available - use IsOpen() to check, if it matters.
virtual void Close()
Close the window. If the window is already closed, nothing
happens.
void BecomeDeleted()
GEM "automatically" deletes desk accessory windows when the current
application changes - it then calls AC_CLOSE. This method changes
the internal information to reflect what GEM has done.
virtual bool IsOpen()
TRUE iff the window is open.
GRect BorderRect()
Returns the entire area covered by the window, including the
GEM frame.
GRect WorkRect()
Returns the area of the interior of the window.
virtual void Top(const GEMevent&)
Raise the window to the top - an event handler.
virtual void Move(int X, int Y)
Move the window such that the top-left of the frame is at the given
pixel position, aligned to the current alignment - see Align() below.
virtual void Resize(int w, int h)
Set the frame of the window to the given pixel dimensions.
virtual GEMfeedback Click(const GEMevent&)
An event handler that is called when the user clicks on the window.
void RedrawOverlaps(const GRect&)
Calls the virtual protected Redraw() method for all the visible
regions of the given area.
int Handle()
Returns the GEM handle of the window.
void Align(int x, int y, int xmult=8, int ymult=1);
Subsequent moves will align such that (x,y) is a multiple
of (xmult,ymult).
virtual GEMfeedback UserClosed()
virtual void UserFulled()
virtual void UserResized( int w,int h )
virtual void UserMoved( int x, int y )
These methods provide an additional level of indirection.
GEMactivity calls THESE methods when the user manipulates
a window, and these methods simply call the Close, Resize,
and Move methods above. However, a SPONTANEOUS Close, Resize,
or Move (say, done my a menu item) will call the direct
methods. See GEMformiconwindow for an example.
virtual GEMfeedback VSlidered(int newPos)
virtual GEMfeedback LineUp()
virtual GEMfeedback LineDown()
virtual GEMfeedback PageUp()
virtual GEMfeedback PageDown()
Methods called when the vertical slider is manipulated.
Normal semantics is as per GEMslider.
virtual GEMfeedback HSlidered(int newPos)
virtual GEMfeedback ColumnLeft()
virtual GEMfeedback ColumnRight()
virtual GEMfeedback PageLeft()
virtual GEMfeedback PageRight()
Methods called when the horizontal slider is manipulated.
Normal semantics is as per GEMslider.
char *InfoText() const
Return a pointer to the current information line text.
void SetInfoText( const char * );
Sets the current information line to a COPY of the given string,
deleting the old information text.
const char *Name()
Return a pointer to the current window name text.
void SetName( const char * );
Sets the window name to a COPY of the given string, deleting
the old name text.
virtual void Flush()
Redraws the window to take into account scrollbar adjustments.
The default is to simply redraw the entire window.
void SetVisibleLines( int noOfLines )
int VisibleLines()
Set/get the number of vertical units that the application
considers to be visible.
void SetTotalLines( int noOfLines )
Set the number of vertical units that the application considers
to be represented by the entire scrollbar.
void SetTopLine( int noOfLine )
int TopLine()
Set/get the line number (starting at 0) that the application
considers to be at the top of the visible area.
int LineHeight()
void LineHeight(int i)
Set/get the PIXEL size of what the application considers a
vertical unit.
void SetVisibleColumns( int noOfColumns )
int VisibleColumns()
void SetTotalColumns( int noOfColumns )
void SetLeftColumn( int noOfColumn )
int LeftColumn()
int ColumnWidth()
void ColumnWidth(int i)
As for Line methods above, but for horizontal (Column) units.
void SetPartColour(int part, short activecolour, short inactivecolour)
Set the colour of a given window-part. Note that the "colour"
is actually as per the ob_spec field of a G_BOXCHAR. The active
colour is for when the window is topped, the inactive for when it
is not.
void SetPartColours(GEMform& active, GEMform& inactive)
Set all parts to the colours defined by the given form by taking
colours of the objects with the same number as the corresponding
part. For example, object 8 (==W_SIZER) will be used for the
colour of the sizer part.
As standard RSC file (WINCOL.RSC) accompanies GEM++ with forms
which look like standard windows, the objects of which are
correctly ordered.
short PartColour(int part, bool active_not_inactive)
Get the colour of a given window-part, as for SetPartColour().
NOTE: This only works with WINX installed.
void DefaultPartColour(int part)
Cause the given part to take on the system default colour rather
than any previously set by SetPartColour().
NOTE: This only works with WINX installed.
PROTECTED MEMBERS:
int parts
The window-parts with which the window was created.
virtual void SetWorkRect( const GRect& )
Derived classes may wish to modify the rectangle or note changes
before or after passing to GEMwindow::SetWorkRect().
virtual bool VAlignSlider()
virtual bool HAlignSlider()
Derived classes may wish to note changes to the slider positions.
Should return TRUE iff the window is changed by the call.
virtual void Redraw(const GRect&)
Redraw the given area of the window. No further clipping is
required to the given rectangle. The procedure does NOTHING
for GEMwindows - derived classes should override this method.
Also, this method should not use wind_update(), as that is
done within RedrawOverlaps().
EXTENSION
A derived class should override Redraw() and Click(), and usually
the protected methods above.
SEE ALSO
GEMformwindow
BUGS
Bugs in GEM++ should be reported to warwick@cs.uq.oz.au
AUTHORS
Warwick Allison, 1993. Andre Pareis, 1992.
warwick@cs.uq.oz.au pareis@cs.tu-berlin.de
COPYING
This functionality is part of the GEM++ library,
and is Copyright 1993 by Warwick W. Allison.
GEM++ is free and protected under the GNU Library General Public
License.
You are free to copy and modify these sources, provided you
acknowledge the origin by retaining this notice, and adhere to
the conditions described in the GNU LGPL.